<?php
namespace Folie\Controller;
use Common\Controller\FolieController;
class IndexController extends FolieController {

    public function setting(){

        $appid = I('get.appid','','htmlspecialchars');

        if ($appid=='wxa750643f18a971e4'){
            $data = array(
                'isshow'=>'0',
                'isshow2'=>'1',
                'appid'=>'wx6b1c7907c5733fc9',
                'url'=>'/pages/index/index',
            );
            $this->returnData($data);
        }

        if ($appid=='wx60ae310026991801'){  //广场舞
            $data = array(
                'isshow'=>'1',
                'isshow2'=>'1',
                'appid'=>'wx6b1c7907c5733fc9',
                'url'=>'/pages/index/index',
            );
            $this->returnData($data);
        }

        if ($appid=='wx514169f146f962d6'){  //端午父亲节
            $data = array(
                'isshow'=>'1',
                'isshow2'=>'1',
                'appid'=>'wx6b1c7907c5733fc9',
                'url'=>'/pages/index/index',
            );
            $this->returnData($data);
        }

        if ($appid=='wxb320539a29a15b10'){  //欢乐六边形游戏盒子
            $data = array(
                'isshow'=>'1',
                'isshow2'=>'1',
                'appid'=>'wx6b1c7907c5733fc9',
                'url'=>'/pages/index/index',
            );
            $this->returnData($data);
        }


        $data = array(
            'isshow'=>'0',
            'isshow2'=>'1',
            'appid'=>'wx370386b7eb0c04bc',
            'url'=>'/pages/index/index',
        );
        $this->returnData($data);
    }

    public function getapp(){

        $data = M('folie_app')->field('title,sort',true)->where(array('isshow'=>'1'))->order('sort asc')->select();

        foreach ($data as  $key=>$val){

            $data[$key]['img'] = $this->url.$data[$key]['img'];
        }

        $this->returnData($data);
    }


}